function myCalculator(init) {
    const that = this // 实例 this 丢失
    that.num = init || 0
    myCalculator.prototype.plus = function(num) {
        that.num += num;
        return myCalculator.prototype
    }
    myCalculator.prototype.minus = function(num) {
        that.num -= num;
        return myCalculator.prototype
    }
    myCalculator.prototype.times = function(num) {
        that.num *= num;
        return myCalculator.prototype
    }
    myCalculator.prototype.divideBy = function(num) {
        that.num /= num;
        return myCalculator.prototype
    }
    myCalculator.prototype.equals = function(num) {
        return that.num
    }
    return myCalculator.prototype
}
console.log(myCalculator(1)
    .plus(1)
    .times(3)
    .equals())